import request from '@/config/axios'

export interface ShopVO {
  id: number
  code: string
  name: string
  mobile: string
  idCard: string
  ownerStatus: boolean
  businessLicense: string
  openStatus: number
  auditingStatus: number
  address: string
  schoolAddress: string
}

// 查询美甲店铺分页
export const getShopPage = async (params) => {
  return await request.get({ url: `/meijia/shop/page`, params })
}

// 查询美甲店铺详情
export const getShop = async (id: number) => {
  return await request.get({ url: `/meijia/shop/get?id=` + id })
}

// 新增美甲店铺
export const createShop = async (data: ShopVO) => {
  return await request.post({ url: `/meijia/shop/create`, data })
}

// 修改美甲店铺
export const updateShop = async (data: ShopVO) => {
  return await request.put({ url: `/meijia/shop/update`, data })
}

// 删除美甲店铺
export const deleteShop = async (id: number) => {
  return await request.delete({ url: `/meijia/shop/delete?id=` + id })
}

// 导出美甲店铺 Excel
export const exportShop = async (params) => {
  return await request.download({ url: `/meijia/shop/export-excel`, params })
}